package com.cqut.familiarity.entity;

import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

import com.cqut.familiarity.entity.vo.answerVO.AnswerVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author atao
 * @since 2021-05-23
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_answer")
@ApiModel(value="Answer对象", description="")
public class Answer implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "所属问卷ID")
    private String questionnaireId;

    @ApiModelProperty(value = "所对应的问题ID")
    private String questionId;

    @ApiModelProperty(value = "对应问题的填写结果")
    private String answer;

    @ApiModelProperty(value = "所有者ID")
    private String user1Id;

    @ApiModelProperty(value = "填写者ID")
    private String user2Id;

    public Answer(AnswerVO answerVO){
        this.questionId = answerVO.getQuestionId();
        this.answer = answerVO.getAnswer();
    }

}
